Week 2 Analysis


Background

Stephanie is a student that will be starting school at BYU-Idaho next semester. Suppose she sent you the following email.


“Hi. My name is Stephanie. I would like to learn about what housing options I have for living at BYU-Idaho next semester. It will be my first semester there, so I would like to find something that is close to campus and around $300 a month in rent. I’m not too picky on roommates, but I would like somewhere that has a lot of people around so I can get to know as many people as possible. Thanks in advance!”


Write your response to Stephanie below. Use the “Rent” dataset, good statistical analysis, and clear writing to make some well-supported suggestions to her about apartments that meet her stated criteria. You are free to use other criteria that you think she might find meaningful as well.

Response

Dear Stephanie,

Thanks for reaching out! Your budget of around $300 per month for housing sums up to $1050 per semester. It’s great that you also want to live close to campus and be around more people. I analyzed all approved women’s housing in Rexburg to find the best options for you.

Here’s a scatterplot that shows the relationship between distance to the Manwaring Center and the semester rent. The size of the dots represents the number of residents in the apartment complex, and the labels show the names of each complex.

library(mosaic)
library(tidyverse)
library(pander)
library(DT)
library(plotly)

# Load dataset
Rent <- read_csv("../Data/Rent.csv")

# Filter data for women's housing
rent_subset2 <- Rent %>%
  filter(Gender == 'F')

# Create scatterplot
rentplotly <- ggplot(data = rent_subset2, mapping = aes(x = CrowFlyMetersToMC, y = AvgFloorPlanCost, size = Residents, label = Name)) +
  geom_point(color = "blue") +
  theme_minimal() +
  labs(title = "BYU-I Approved Women's Housing", x = "Distance to MC (meters)", y = "Semester Rent")

ggplotly(rentplotly)

Key Insights

The analysis suggests that Royal Crest is the best option for you:

  • Affordability: At $995 per semester, Royal Crest is $345 cheaper than the average housing cost of $1,340.
  • Proximity: Located just 427 meters from the MC (as measured in a straight line), it is 191 meters closer than the average housing distance of 618 meters.
  • Community: With 302 residents, Royal Crest offers the largest resident population among apartments in this price range, making it ideal for socializing and meeting new people.

Here’s a summary of the statistics for approved women’s housing:

# Summary statistics
summary_stats <- rent_subset2 %>%
  summarize(
    avg_rent = mean(AvgFloorPlanCost),
    avg_distance = mean(CrowFlyMetersToMC),
    avg_residents = mean(Residents)
  )

summary_stats %>% pander()
avg_rent avg_distance avg_residents
1340 618.2 151.8

If you’re interested in other options, here’s a table of apartments that meet your criteria:

# Filter for apartments within budget and proximity
filtered_rent <- Rent %>%
  filter(Gender == 'F', AvgFloorPlanCost <= 1050, CrowFlyMetersToRicks < 1000)

datatable(filtered_rent[c('Name', 'AvgFloorPlanCost', 'CrowFlyMetersToMC', 'Residents')], 
          options = list(lengthMenu = c(12, 30)), extensions = "Responsive")

Interpretation

Royal Crest stands out as the best option based on affordability, proximity, and community size. If you need help exploring other options or have further questions, feel free to ask!